package com.leoman.resources.dao;

import com.leoman.common.dao.IBaseJpaRepository;
import com.leoman.resources.entity.GameResource;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by Administrator on 2016/6/12.
 */
public interface GameResourcesDao extends IBaseJpaRepository<GameResource> {

    @Query("select a from GameResource a")
    Page<GameResource> pageByParams(Pageable pageable);

    @Query("select a from GameResource a where a.name like ?1")
    Page<GameResource> pageByParams(String name, Pageable pageable);
}
